home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / PTR-TCL v2.1 / Support / New TCL Source / Exceptions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-17  |  763 b   |  42 lines  |  [TEXT/MMCC]

  1. /*
  2.  * Exceptions.h
  3.  */
  4.  
  5. #pragma once
  6.  
  7. #ifndef __EXCEPTIONS__
  8. # define __EXCEPTIONS__
  9.  
  10. extern Boolean gBreakFailure ;
  11.  
  12. #include "x.h"
  13.  
  14. #define ENDTRY DONE
  15. #define FailOSErr(x) FailErr(x)
  16. #define FailMemError() FailErr(MemError())
  17. #define FailResError() FailErr(ResError())
  18. #define FailNIL(x) {if((x)==NULL){FailErr(-108);}}
  19. #define FailNILRes(x) {if((x)==NULL){FailErr(-192);}}
  20.  
  21. #if DEBUG
  22. # define ASSERT(x) {if(!(x)){DebugStr((unsigned char*)"\pASSERTION FAILED!");}}
  23. #else
  24. # define ASSERT(x) NULL
  25. #endif
  26.  
  27. #define kSilentErr 1
  28.  
  29. enum {
  30.     excNoException ,
  31.     excMsgNullObject ,
  32.     excMsgLookupFailed ,
  33.     excNewByNameFailed ,
  34.     excPrintJobTooBig ,
  35.     excExceedTELimit ,
  36.     excLastTCLException = excExceedTELimit
  37. } ;
  38.  
  39. extern long SpecifyMsg ( short suite , short id ) ;
  40.  
  41. #endif
  42.